package com.yanqu.road.entity.monopolymarket.resgrab;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.player.UserBaseInfo;

/**
 * @Description 榷署战报
 * @Author cwq
 * @Data 2021/8/11 16:57
 */
@FieldTypeAnnotation(tableName = "t_u_monopolymarket_report_data")
public class MonopolyMarketReportData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "资源类型")
    private int type;

    @FieldTypeAnnotation(desc = "占领 位置id")
    private int posIndex;

    @FieldTypeAnnotation(desc = "强夺者id")
    private long robId;

    @FieldTypeAnnotation(desc = "是否胜利")
    private boolean isWin;

    @FieldTypeAnnotation(desc = "抢夺时间 s")
    private int time;

    @FieldTypeAnnotation(desc = "抢夺者基本信息")
    private UserBaseInfo robInfo = new UserBaseInfo();

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getType() {
        return type;
    }
    public void setType(int type) {
        if (this.type != type) {
            this.type = type;
            setOp(DataStatus.Update);
        }
    }

    public int getPosIndex() {
        return posIndex;
    }
    public void setPosIndex(int posIndex) {
        if (this.posIndex != posIndex) {
            this.posIndex = posIndex;
            setOp(DataStatus.Update);
        }
    }

    public long getRobId() {
        return robId;
    }
    public void setRobId(long robId) {
        if (this.robId != robId) {
            this.robId = robId;
            setOp(DataStatus.Update);
        }
    }

    public boolean getIsWin() {
        return isWin;
    }
    public void setIsWin(boolean isWin) {
        if (this.isWin != isWin) {
            this.isWin = isWin;
            setOp(DataStatus.Update);
        }
    }

    public int getTime() {
        return time;
    }
    public void setTime(int time) {
        if (this.time != time) {
            this.time = time;
            setOp(DataStatus.Update);
        }
    }

    public UserBaseInfo getRobInfo() {
        return robInfo;
    }
    public void setRobInfo(UserBaseInfo robInfo) {
        if (null == robInfo){
            return;
        }
        if (this.robInfo == null || !this.robInfo.equals(robInfo)) {
            this.robInfo = robInfo;
            setOp(DataStatus.Update);
        }
    }

}